
cmake_minimum_required(VERSION 3.6.0)

message(CMAKE_SOURCE_DIR============${CMAKE_SOURCE_DIR})
message(PROJECT_SOURCE_DIR=========${PROJECT_SOURCE_DIR})
message(CMAKE_ANDROID_ARCH_ABI=========${CMAKE_ANDROID_ARCH_ABI})

#批量导入cpp文件
file(GLOB source_file ${CMAKE_SOURCE_DIR}/*.cpp)
include_directories("${CMAKE_SOURCE_DIR}/include")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}")

add_library(native-demo SHARED ${source_file})


find_library(log-lib log)

#ffmpeg以静态库引入的形式，必须 avformat 在 avcodec 前面，且依赖 系统的 z 库。
target_link_libraries(native-demo ${log-lib} avformat avcodec avfilter  avutil swresample postproc z)